package com.hzky.demo.dao;

import com.hzky.demo.model.HomeworkUpload;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by admin on 2017/6/8.
 */
public interface HomeworkUploadDao extends JpaRepository<HomeworkUpload,Integer> {

    @Query(value = "select a.* from child_english.dbo.homework_upload a where a.homework_id=:homeworkId and a.student_id=:studentId",nativeQuery = true)
    HomeworkUpload getByHomeworkIdandStudentId(@Param("homeworkId")Integer homeworkId,@Param("studentId")Integer studentId);
}
